package org.jbfilter.impl;

import org.jbfilter.core.fcomps.logic.DynamicLogicFilterComponent;
import org.jbfilter.core.fcomps.logic.Logic;

class _DynamicLogicFilterComponentImpl<E>
	extends
		_LogicFilterComponentImpl<E>
	implements
		DynamicLogicFilterComponent<E> {

	private Logic logic = Logic.and;

	// constructors
	_DynamicLogicFilterComponentImpl() {
		super();
	}
	_DynamicLogicFilterComponentImpl(String id) {
		super(id);
	}

	@Override
	public Logic getLogic() {
		return logic;
	}
	@Override
	public void setLogic(Logic logic) {
		if (logic == null) {
			throw new NullPointerException("The logic to set can't be null.");
		}
		this.logic = logic;
	}
}
